package com.zmn.oms.business.impl.third;

import com.zmn.common.constant.GlobalConsts;
import com.zmn.oms.business.interfaces.third.JingDongServicePlusExtendService;
import com.zmn.oms.model.entity.third.JingDongServicePlusExtendOrder;
import com.zmn.oms.persistence.interfaces.third.JingDongServicePlusDAO;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Date;

/**
 * 类描述：
 *
 * @author LiangHailong
 * @date 2021/07/12 17:05
 */
@Service("jingDongServicePlusExtendService")
public class JingDongServicePlusExtendServiceImpl implements JingDongServicePlusExtendService {

    @Resource
    private JingDongServicePlusDAO jingDongServicePlusDAO;

    @Override
    public Integer saveOrderScalping(Long orderId) {
        if (orderId == null) {
            return 0;
        }
        JingDongServicePlusExtendOrder model = new JingDongServicePlusExtendOrder();
        model.setOrderId(orderId);
        model.setScalping(GlobalConsts.YES);
        model.setCreateTime(new Date());
        return jingDongServicePlusDAO.insertModel(model);
    }
}
